package tk.mybatis.springboot.service;

import java.util.List;

import org.springframework.stereotype.Service;

/**
 * 通用接口
 */
@Service
public interface IService<T> {

    T selectByKey(Object key);

    int save(T entity);
    int batchSave(List <T> entity);
   
    int saveNullByDefault(T entity);

    int delete(Object key);

    int updateByEntity(T entity);

    int updateNotNull(T entity);

    List<T> selectByExample(Object example);

    int updateByExample(T entity,List<LogicalParam> params);
    int updateByExamplePropsNotNull(T entity,List<LogicalParam> params);

    int deleteByExample(T entity,List<LogicalParam> params);


    //TODO 其他...
}